<?php

include_once '../inc/db_util.php';

function viewMatkul() {
    $array_announce = array();
    $query = mysql_query("SELECT * FROM tb_matkul_master");

    while ($row = mysql_fetch_array($query, MYSQL_BOTH)) {
        $row_array['Id'] = $row['id_matkul'];
        $row_array['Kode'] = $row['kode_matkul'];
        $row_array['Nama'] = $row['matkul'];
        $row_array['SKS'] = $row['sks'];
        $row_array['Semester'] = $row['semester'];

        array_push($array_announce, $row_array);
    }
    return json_encode($array_announce);
}

?>
